[mirrors]
http://ftp.de.debian.org/debian/pool/main/libc/libcap2/libcap2_2.22.orig.tar.gz

[vars]
filesize=67432
sha512=b66cd3e233cab9c35334c3ed824f2b6207a46b7320be0a29f5290a32cbf4ea7c4fbf22125541cfa25fdd7466d9c14373ff5f68b53fe44036af6763d3ff1cb398
tardir=libcap-2.22

[deps]
attr

[deps.host]
perl

[build]
sed -i 's@/bin/bash@/bin/sh@g' progs/capsh.c
make -j$MAKE_THREADS prefix="$butch_prefix" lib=lib \
  CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags" \
  BUILD_CC="$HOSTCC" CC="$CC"

make RAISE_SETFCAP=no FAKEROOT="$butch_install_dir" prefix="$butch_prefix" lib=lib install
LIBDIR=$butch_install_dir$butch_prefix/lib
SBINDIR=$butch_install_dir$butch_prefix/sbin

LD_LIBRARY_PATH=${LIBDIR} ${SBINDIR}/setcap cap_setfcap=i ${SBINDIR}/setcap || echo \
  "there was an error setting caps, you may want to investigate this"
